Integrand size = 24, antiderivative size = 102 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {3 a^4 \sin (c+d x)}{35 d}-\frac {a^4 \sin ^3(c+d x)}{35 d}-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}-\frac {2 i \cos ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{35 d} \]
3/35*a^4*sin(d*x+c)/d-1/35*a^4*sin(d*x+c)^3/d-2/7*I*a*cos(d*x+c)^7*(a+I*a* tan(d*x+c))^3/d-2/35*I*cos(d*x+c)^5*(a^4+I*a^4*tan(d*x+c))/d
Time = 0.61 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.77 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {a^4 (-i \cos (3 (c+d x))+\sin (3 (c+d x))) \left (35 \sqrt {\cos ^2(c+d x)}+8 \left (4+7 \sqrt {\cos ^2(c+d x)}\right ) \cos (2 (c+d x))+\left (32+5 \sqrt {\cos ^2(c+d x)}\right ) \cos (4 (c+d x))-32 i \sin (2 (c+d x))-14 i \sqrt {\cos ^2(c+d x)} \sin (2 (c+d x))-32 i \sin (4 (c+d x))+5 i \sqrt {\cos ^2(c+d x)} \sin (4 (c+d x))\right )}{280 d \sqrt {\cos ^2(c+d x)}} \]
(a^4*((-I)*Cos[3*(c + d*x)] + Sin[3*(c + d*x)])*(35*Sqrt[Cos[c + d*x]^2] + 8*(4 + 7*Sqrt[Cos[c + d*x]^2])*Cos[2*(c + d*x)] + (32 + 5*Sqrt[Cos[c + d* x]^2])*Cos[4*(c + d*x)] - (32*I)*Sin[2*(c + d*x)] - (14*I)*Sqrt[Cos[c + d* x]^2]*Sin[2*(c + d*x)] - (32*I)*Sin[4*(c + d*x)] + (5*I)*Sqrt[Cos[c + d*x] ^2]*Sin[4*(c + d*x)]))/(280*d*Sqrt[Cos[c + d*x]^2])
Time = 0.43 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {3042, 3977, 3042, 3977, 3042, 3113, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^4}{\sec (c+d x)^7}dx\) |
\(\Big \downarrow \) 3977 |
\(\displaystyle \frac {1}{7} a^2 \int \cos ^5(c+d x) (i \tan (c+d x) a+a)^2dx-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} a^2 \int \frac {(i \tan (c+d x) a+a)^2}{\sec (c+d x)^5}dx-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3977 |
\(\displaystyle \frac {1}{7} a^2 \left (\frac {3}{5} a^2 \int \cos ^3(c+d x)dx-\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}\right )-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} a^2 \left (\frac {3}{5} a^2 \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}\right )-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {1}{7} a^2 \left (-\frac {3 a^2 \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{5 d}-\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}\right )-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{7} a^2 \left (-\frac {3 a^2 \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{5 d}-\frac {2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}\right )-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}\) |
(((-2*I)/7)*a*Cos[c + d*x]^7*(a + I*a*Tan[c + d*x])^3)/d + (a^2*((-3*a^2*( -Sin[c + d*x] + Sin[c + d*x]^3/3))/(5*d) - (((2*I)/5)*Cos[c + d*x]^5*(a^2 + I*a^2*Tan[c + d*x]))/d))/7
3.1.57.3.1 Defintions of rubi rules used
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[2*b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^( n - 1)/(f*m)), x] - Simp[b^2*((m + 2*n - 2)/(d^2*m)) Int[(d*Sec[e + f*x]) ^(m + 2)*(a + b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 + b^2, 0] && GtQ[n, 1] && ((IGtQ[n/2, 0] && ILtQ[m - 1/2, 0]) || (EqQ[n, 2] && LtQ[m, 0]) || (LeQ[m, -1] && GtQ[m + n, 0]) || (ILtQ[m, 0] & & LtQ[m/2 + n - 1, 0] && IntegerQ[n]) || (EqQ[n, 3/2] && EqQ[m, -2^(-1)])) && IntegerQ[2*m]
Time = 131.89 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.73
method | result | size |
risch | \(-\frac {i a^{4} {\mathrm e}^{7 i \left (d x +c \right )}}{56 d}-\frac {3 i a^{4} {\mathrm e}^{5 i \left (d x +c \right )}}{40 d}-\frac {i a^{4} {\mathrm e}^{3 i \left (d x +c \right )}}{8 d}-\frac {i a^{4} {\mathrm e}^{i \left (d x +c \right )}}{8 d}\) | \(74\) |
derivativedivides | \(\frac {a^{4} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{7}-\frac {3 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{35}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{35}\right )-4 i a^{4} \left (-\frac {\left (\cos ^{5}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )-6 a^{4} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {4 i a^{4} \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{4} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(203\) |
default | \(\frac {a^{4} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{7}-\frac {3 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{35}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{35}\right )-4 i a^{4} \left (-\frac {\left (\cos ^{5}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )-6 a^{4} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {4 i a^{4} \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{4} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(203\) |
-1/56*I*a^4/d*exp(7*I*(d*x+c))-3/40*I*a^4/d*exp(5*I*(d*x+c))-1/8*I*a^4/d*e xp(3*I*(d*x+c))-1/8*I*a^4/d*exp(I*(d*x+c))
Time = 0.25 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.61 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {-5 i \, a^{4} e^{\left (7 i \, d x + 7 i \, c\right )} - 21 i \, a^{4} e^{\left (5 i \, d x + 5 i \, c\right )} - 35 i \, a^{4} e^{\left (3 i \, d x + 3 i \, c\right )} - 35 i \, a^{4} e^{\left (i \, d x + i \, c\right )}}{280 \, d} \]
1/280*(-5*I*a^4*e^(7*I*d*x + 7*I*c) - 21*I*a^4*e^(5*I*d*x + 5*I*c) - 35*I* a^4*e^(3*I*d*x + 3*I*c) - 35*I*a^4*e^(I*d*x + I*c))/d
Time = 0.29 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.53 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\begin {cases} \frac {- 2560 i a^{4} d^{3} e^{7 i c} e^{7 i d x} - 10752 i a^{4} d^{3} e^{5 i c} e^{5 i d x} - 17920 i a^{4} d^{3} e^{3 i c} e^{3 i d x} - 17920 i a^{4} d^{3} e^{i c} e^{i d x}}{143360 d^{4}} & \text {for}\: d^{4} \neq 0 \\x \left (\frac {a^{4} e^{7 i c}}{8} + \frac {3 a^{4} e^{5 i c}}{8} + \frac {3 a^{4} e^{3 i c}}{8} + \frac {a^{4} e^{i c}}{8}\right ) & \text {otherwise} \end {cases} \]
Piecewise(((-2560*I*a**4*d**3*exp(7*I*c)*exp(7*I*d*x) - 10752*I*a**4*d**3* exp(5*I*c)*exp(5*I*d*x) - 17920*I*a**4*d**3*exp(3*I*c)*exp(3*I*d*x) - 1792 0*I*a**4*d**3*exp(I*c)*exp(I*d*x))/(143360*d**4), Ne(d**4, 0)), (x*(a**4*e xp(7*I*c)/8 + 3*a**4*exp(5*I*c)/8 + 3*a**4*exp(3*I*c)/8 + a**4*exp(I*c)/8) , True))
Time = 0.31 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.46 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {20 i \, a^{4} \cos \left (d x + c\right )^{7} + 4 i \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} a^{4} + 2 \, {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} a^{4} + {\left (5 \, \sin \left (d x + c\right )^{7} - 7 \, \sin \left (d x + c\right )^{5}\right )} a^{4} + {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{4}}{35 \, d} \]
-1/35*(20*I*a^4*cos(d*x + c)^7 + 4*I*(5*cos(d*x + c)^7 - 7*cos(d*x + c)^5) *a^4 + 2*(15*sin(d*x + c)^7 - 42*sin(d*x + c)^5 + 35*sin(d*x + c)^3)*a^4 + (5*sin(d*x + c)^7 - 7*sin(d*x + c)^5)*a^4 + (5*sin(d*x + c)^7 - 21*sin(d* x + c)^5 + 35*sin(d*x + c)^3 - 35*sin(d*x + c))*a^4)/d
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1327 vs. \(2 (86) = 172\).
Time = 0.76 (sec) , antiderivative size = 1327, normalized size of antiderivative = 13.01 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\text {Too large to display} \]
1/143360*(89950*a^4*e^(12*I*d*x + 6*I*c)*log(I*e^(I*d*x + I*c) + 1) + 5397 00*a^4*e^(10*I*d*x + 4*I*c)*log(I*e^(I*d*x + I*c) + 1) + 1349250*a^4*e^(8* I*d*x + 2*I*c)*log(I*e^(I*d*x + I*c) + 1) + 1349250*a^4*e^(4*I*d*x - 2*I*c )*log(I*e^(I*d*x + I*c) + 1) + 539700*a^4*e^(2*I*d*x - 4*I*c)*log(I*e^(I*d *x + I*c) + 1) + 1799000*a^4*e^(6*I*d*x)*log(I*e^(I*d*x + I*c) + 1) + 8995 0*a^4*e^(-6*I*c)*log(I*e^(I*d*x + I*c) + 1) + 86065*a^4*e^(12*I*d*x + 6*I* c)*log(I*e^(I*d*x + I*c) - 1) + 516390*a^4*e^(10*I*d*x + 4*I*c)*log(I*e^(I *d*x + I*c) - 1) + 1290975*a^4*e^(8*I*d*x + 2*I*c)*log(I*e^(I*d*x + I*c) - 1) + 1290975*a^4*e^(4*I*d*x - 2*I*c)*log(I*e^(I*d*x + I*c) - 1) + 516390* a^4*e^(2*I*d*x - 4*I*c)*log(I*e^(I*d*x + I*c) - 1) + 1721300*a^4*e^(6*I*d* x)*log(I*e^(I*d*x + I*c) - 1) + 86065*a^4*e^(-6*I*c)*log(I*e^(I*d*x + I*c) - 1) - 89950*a^4*e^(12*I*d*x + 6*I*c)*log(-I*e^(I*d*x + I*c) + 1) - 53970 0*a^4*e^(10*I*d*x + 4*I*c)*log(-I*e^(I*d*x + I*c) + 1) - 1349250*a^4*e^(8* I*d*x + 2*I*c)*log(-I*e^(I*d*x + I*c) + 1) - 1349250*a^4*e^(4*I*d*x - 2*I* c)*log(-I*e^(I*d*x + I*c) + 1) - 539700*a^4*e^(2*I*d*x - 4*I*c)*log(-I*e^( I*d*x + I*c) + 1) - 1799000*a^4*e^(6*I*d*x)*log(-I*e^(I*d*x + I*c) + 1) - 89950*a^4*e^(-6*I*c)*log(-I*e^(I*d*x + I*c) + 1) - 86065*a^4*e^(12*I*d*x + 6*I*c)*log(-I*e^(I*d*x + I*c) - 1) - 516390*a^4*e^(10*I*d*x + 4*I*c)*log( -I*e^(I*d*x + I*c) - 1) - 1290975*a^4*e^(8*I*d*x + 2*I*c)*log(-I*e^(I*d*x + I*c) - 1) - 1290975*a^4*e^(4*I*d*x - 2*I*c)*log(-I*e^(I*d*x + I*c) - ...
Time = 4.93 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.82 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {2\,a^4\,\left (35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,105{}\mathrm {i}-210\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,210{}\mathrm {i}+147\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,49{}\mathrm {i}-12\right )}{35\,d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,7{}\mathrm {i}+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,35{}\mathrm {i}-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,21{}\mathrm {i}+7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \]
-(2*a^4*(tan(c/2 + (d*x)/2)*49i + 147*tan(c/2 + (d*x)/2)^2 - tan(c/2 + (d* x)/2)^3*210i - 210*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^5*105i + 35*t an(c/2 + (d*x)/2)^6 - 12))/(35*d*(7*tan(c/2 + (d*x)/2) - tan(c/2 + (d*x)/2 )^2*21i - 35*tan(c/2 + (d*x)/2)^3 + tan(c/2 + (d*x)/2)^4*35i + 21*tan(c/2 + (d*x)/2)^5 - tan(c/2 + (d*x)/2)^6*7i - tan(c/2 + (d*x)/2)^7 + 1i))